﻿using System.ServiceModel;

namespace DataFeedService
{
    [ServiceContract(CallbackContract = typeof(IClientCallback), SessionMode = SessionMode.Required)]
    public interface IMarketData
    {
        [OperationContract(IsOneWay = false, IsInitiating = true)]
        void Subscribe();

        [OperationContract(IsOneWay = true, IsTerminating = true)]
        void Unsubscribe();
    }

    public interface IClientCallback
    {
        [OperationContract(IsOneWay = true)]
        void SendTickUpdate(TickUpdate update);
    }
}
